home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / dviware / dvibook / libtex / postamble.h < prev    next >
C/C++ Source or Header  |  1994-03-18  |  2KB  |  49 lines

  1. /*
  2.  * Copyright (c) 1987, 1989 University of Maryland
  3.  * Department of Computer Science.  All rights reserved.
  4.  * Permission to copy for any purpose is hereby granted
  5.  * so long as this copyright notice remains intact.
  6.  */
  7.  
  8. /* Definitions for ScanPostAmble */
  9.  
  10. /*
  11.  * ScanPostAmble reads the postamble of a DVI file from the (stdio)
  12.  * file specified in its first argument.  It is handed two pointers to
  13.  * functions.  The first (ScanPostAmble's second argument) is called
  14.  * after the header information has been read, and given a pointer to a
  15.  * PostAmbleInfo structure.  It is the job of this function to extract the
  16.  * required information from this structure (which is deallocated when
  17.  * ScanPostAmble returns).
  18.  *
  19.  * The second function is called once for each font definition occurring in
  20.  * the postamble, and is given a pointer to a PostAmbleFont structure.  This
  21.  * function should do whatever the device needs to read the actual font.
  22.  *
  23.  * If the DVI file appears malformed, ScanPostAmble will print an error
  24.  * message and exit.  (Drastic, perhaps, but effective.)
  25.  */
  26.  
  27. struct PostAmbleInfo {
  28.     i32    pai_PrevPagePointer;    /* previous page pointer */
  29.     i32    pai_Numerator;        /* numerator from dvi file */
  30.     i32    pai_Denominator;    /* denominator from dvi file*/
  31.     i32    pai_DVIMag;        /* \magnification */
  32.     i32    pai_TallestPageHeight;    /* height of tallest page */
  33.     i32    pai_WidestPageWidth;    /* width of widest page */
  34.     int    pai_DVIStackSize;    /* DVI stack size required */
  35.     int    pai_NumberOfPages;    /* total number of pages in DVI file */
  36. };
  37.  
  38. struct PostAmbleFont {
  39.     char    *paf_name;        /* name of font (null terminated) */
  40.     int     paf_n1;            /* length of first part of name */
  41.     int     paf_n2;            /* length of second part of name */
  42.     i32     paf_DVIFontIndex;    /* font index number */
  43.     i32     paf_DVIChecksum;    /* checksum from DVI file */
  44.     i32     paf_DVIMag;        /* "at size" */
  45.     i32     paf_DVIDesignSize;    /* design size of font */
  46. };
  47.  
  48. int    ScanPostAmble();
  49.